/*
 * @Author: Soulmate
 * @Date: 2023-09-12 09:14:43
 * @LastEditTime: 2023-09-15 15:05:52
 * @LastEditors: Soulmate
 * @Description: 
 * @FilePath: \ruoyi-ui-vue3\vite\plugins\mock-serve.ts
 * 版权声明
 */
import { viteMockServe } from 'vite-plugin-mock'

export default function createMockData(isBuild) {
    return viteMockServe({
      mockPath: "mock",
      localEnabled: !isBuild,
      prodEnabled: isBuild,
      injectCode: `
          import { setupProdMockServer } from './mockProdServer';
          setupProdMockServer();
        `,
      logger: false
    })
}
